package com.twu.biblioteca.menuoption.books;

import com.twu.biblioteca.content.BookContent;
import com.twu.biblioteca.menuoption.CheckoutOptionAbstract;
import com.twu.biblioteca.users.BibliotecaUsers;

import java.io.BufferedReader;

/**
 * Created by mduemcke on 9/23/14.
 */
public class ReturnBook extends CheckoutOptionAbstract {

    BookContent content;

    public ReturnBook(BookContent content, BufferedReader reader) {
        super(reader, "Return book", 'R');
        this.content = content;
    }

    @Override
    public void processOption() {
        String input = askForDetails("Type in the book title:");
        if(input != null) {
            content.returnItem(input);
        }
    }
}
